-
Notifications
You must be signed in to change notification settings - Fork 49
Conversation
b9d9052
to
5576afa
Compare
76aafa6
to
c6dbe5c
Compare
c6dbe5c
to
975875c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I get all the implications of using GitVersion (actually, I'm quite sure that I do not all of it). But so I sounds quite reasonable to me.
build.cake
Outdated
@@ -2,6 +2,8 @@ | |||
#tool nuget:?package=GitVersion.CommandLine | |||
#addin "Cake.Incubator" | |||
|
|||
using System.Text.RegularExpressions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a regular expression at one point but it's gone now.
build.cake
Outdated
@@ -1,4 +1,8 @@ | |||
#tool nuget:?package=NUnit.ConsoleRunner&version=3.6.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are back to using both tabs and spaces for indention in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I should try to tell VS how to handle this file.
0bd7763
to
10abbd8
Compare
@NUnitSoftware/gui-team @ChrisMaddock @rprouse That said, it's still not doing anything but merely displaying what it would do. Next commits will actually begin to impact the packaging. I'm saving modification of the AssemblyInfo for last. 😃 |
pardon if this is a dumb question but is this changing how we do our branching and do our pull requests??? or just how the CI's handle our PR's and branches? |
It's changing how we version. Normally, when you do a branch and PR, you don't set the version. Our script handles it. But the script depends on the version being coded in it somewhere - as well as in the AssemblyInfo files. Once we implement this, I'd hope to end up where we no longer have the version in any of our source code and therefore don't need to update it. GitVersion can examine the repository history and decide what version we want, based on some conventions and the settings we establish. Currently, we create automatic pre-release suffixes for our versions on AppVeyor only, using environment variables they provide. Once this is in place, we'll have a consistent automatic method that works on AppVeyor, Travis and locally. Initially, final (non-preview) releases will continue to be done manually. But this will enable a later change to do them automatically as well. All that adds up to more frequent automated releases, which has to be a good thing! |
94ec480
to
87bb6ca
Compare
With the latest commits, we are now using the info from GitVersion to do packaging. The hard-coded version in the script is no longer used. There is still quite a lot of debug info in the script, which I will remove when it's no longer needed. I'll reformat using spaces everywhere before merge as well. Note that we can't do a chocolatey package on Linux without a bunch of work, so I'm simply not creating one. Next step is to deal with the AssemblyInfo files. |
aa1a7c1
to
5312802
Compare
4f5c353
to
d9606c0
Compare
This is ready for review and merge once CI passes. |
4538d04
to
e08bac4
Compare
I'll take a look at it tonight (in approx. 3 hours) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have very minor nitpick and some comments.
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file included on purpose? I can google that it defines a vscode task, but I cannot find the script Package that is mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because I executed tasks in the script under VsCode. File should be in .gitignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script is build.cake, Package is a target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. The "script": "Package"
was a bit misleading 😄
build.cake
Outdated
#tool nuget:?package=GitVersion.CommandLine | ||
#addin "Cake.Incubator" | ||
|
||
using System.Text.RegularExpressions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex is back for parsing whether it is a PR or not, so we should keep this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly.
@@ -167,9 +144,7 @@ Task("PackageZip") | |||
BIN_DIR + "CHANGES.txt", | |||
BIN_DIR + "nunit-gui.exe", | |||
BIN_DIR + "nunit-gui.exe.config", | |||
BIN_DIR + "nunit-gui.pdb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the motivation for not providing pdbs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They break the build under Mono 4.6.2, which doesn't produce them. We could put them back if we used logic to include them only when they actually are present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Let us just leave them out to begin with. Then we can always include them later.
.travis.yml
Outdated
- ./build.sh -target="Travis" -configuration="Release" -verbosity="verbose" | ||
- git fetch --unshallow | ||
- ./build.sh --target "Travis" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed a commit b758c79 to correct the error from the merge (the error made Travis fail every time).
@CharliePoole .tavis.yml should contain something like |
Can you explain further? Is the problem the dash, the missing config, the need for verbosity? Is this because of merging the new Cake bootstrap script? Seems like, if it messes us up, we might not want it. |
Going to bed... I'll look at this in the morning. |
When you merged master to this branch no change was made to .tavis.yml (as far as I can tell), even though it was changed on master (I don't know much about GIT merges, but I guess that there must have been a conflict since you had made changes to the file on this branch). So we lost the changes done to .tavis.yml. So I made the commit b758c79 (on this branch) to solve the problem, but I think that you concurrently also tried to solve the problem (see ae9e7a3) and as a result overwrote my change when the to commits were merged in b813c78. .tavis.yml on master You can also see the diff between master and this branch here And yes, it is because of the new bootstrap script, but I don't think that it is more problematic than other changes we do (and since we change .travis.yml quite rarely I don't think that it will effect us much). |
I understand that it would probably work if I put it back to how it was in master. It would also probably work if I backed out the upgraded build.sh script. I'm trying to figure out which is the best course of action. I take it you are saying you merely used the args from master, and they work. But those args are wrong in several senses. We don't want verbose output. We shouldn't have to specify the configuration, since it is supposed to use our default in @jnm2 Is this related to the changes you made to Cake? If so can you give us info about exactly what changed in the command-line args or point to same? |
@CharliePoole I put all the details in cake-build/resources#33. I was just on Gitter earlier bugging them again to get cake-build/resources#34 validated and merged. |
@jnm2 The command that was failing for me most recently was
before that this was failing:
Is it the quotation marks? |
@CharliePoole nothing has changed WRT quotation marks, thankfully! The issue is that right now the only format build.sh understands is the format Cake.exe understands, which is From the page I linked, this is what you can do right now:
This is what you used to be able to do:
Hopefully the PR is merged soon and you can go back to separating with a space. :-/ |
It's the |
b813c78
to
62a1cfd
Compare
The reason for why I chose set |
This is the best place to keep defaults: Cake's template has |
@mikkelbu Yes, I now understand that. It's a breaking change on the part of the Cake folks. I agree with how you compensated and put back in the configuration arg. Problem is, these updates come out without any release info on the part of Cake. @jnm2 Wrong. 😄 We got Debug as a default when we ran Cake directly and Release when we ran build.ps1 or build.sh. I worked for quite a while using Cake directly locally and only using the bootstrap scripts in CI. I always thought it was weird that we defaulted to Release in one case and Debug in the other, but I got used to it and our CI scripts came to depend on it. I agree it makes the most sense for the bootstrap scripts to be neutral in terms of defaults that are passed to Cake. It's just a change from the past and not one that's easy to notice in all cases. |
My bad. Thanks for filling me in on the history behind it. |
Fixes #206
This is initial implementation of the use of GitVersion to determine the correct version for each build. When complete, it will no longer be necessary to track and update the version of the GUI in the source code or scripts.
The initial commit calculates and displays the version info that would be used but doesn't actually use it. By creating a PR, I'll be able to see how the pre-release tag portion of the version is set for PRs, but the PR should not be merged by anyone but me, after it's working correctly.
Please review and comment on the versioning scheme anyway!